/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.produccion.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author carlosdavid
 */
@Entity
@Table(name = "tipooperacion", catalog = "base_prod", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tipooperacion.findAll", query = "SELECT t FROM Tipooperacion t"),
    @NamedQuery(name = "Tipooperacion.findByTipoOperacion", query = "SELECT t FROM Tipooperacion t WHERE t.tipoOperacion = :tipoOperacion"),
    @NamedQuery(name = "Tipooperacion.findByDescripcion", query = "SELECT t FROM Tipooperacion t WHERE t.descripcion = :descripcion")})
public class Tipooperacion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "tipoOperacion", nullable = false, length = 2)
    private String tipoOperacion;
    @Column(name = "descripcion", length = 100)
    private String descripcion;

    public Tipooperacion() {
    }

    public Tipooperacion(String tipoOperacion) {
        this.tipoOperacion = tipoOperacion;
    }

    public String getTipoOperacion() {
        return tipoOperacion;
    }

    public void setTipoOperacion(String tipoOperacion) {
        this.tipoOperacion = tipoOperacion;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tipoOperacion != null ? tipoOperacion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tipooperacion)) {
            return false;
        }
        Tipooperacion other = (Tipooperacion) object;
        if ((this.tipoOperacion == null && other.tipoOperacion != null) || (this.tipoOperacion != null && !this.tipoOperacion.equals(other.tipoOperacion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.produccion.entity.Tipooperacion[ tipoOperacion=" + tipoOperacion + " ]";
    }
    
}
